import { Input } from 'antd';
import React from 'react';

interface SearchInputProps {
  placeholder: string;
  onSearch: (value: string) => void;
  className?: string;
  style?: React.CSSProperties;
}

const SearchInput: React.FC<SearchInputProps> = ({ placeholder, onSearch, className, style }) => {
  return (
    <Input.Search
      className={className}
      placeholder={placeholder}
      allowClear
      onSearch={onSearch}
      onChange={(e) => onSearch(e.target.value)}
      style={style}
    />
  );
};

export default SearchInput;
